package rigby.projects.wikipediawebcrawler;

import java.io.IOException;
import java.io.FileWriter;
import java.io.BufferedWriter;

public class FileDataProcessor {

	 public void writeToFile(String destinationPath, String initialLink, int jumpNum){
		FileWriter destinationFile = null;
		BufferedWriter bw = null;
		
		try {
			destinationFile = new FileWriter(destinationPath, true);
			bw = new BufferedWriter(destinationFile);
			bw.newLine();
			bw.append("Start URL: " + initialLink);
			bw.newLine();
			bw.append("Number of jumps: "+ jumpNum+"");
			bw.newLine();
		} catch (IOException e) {
				e.printStackTrace();
		} finally {
			try {
				bw.close();
				destinationFile.close();
			} catch (IOException e) {
				e.printStackTrace();
				
			}
		}
	}
}
